package aad.storyboard.transitions;

import aad.storyboard.controller.SceneTransition;
import android.view.animation.AlphaAnimation;
import android.widget.RelativeLayout;
import android.widget.ViewFlipper;

public class FadeOutTransition extends SceneTransition{	
	
	public FadeOutTransition(int startTime, long duration, ViewFlipper flipper) {
			super (startTime, duration);	
			this.current=(RelativeLayout)flipper.getChildAt(flipper.getDisplayedChild());
		
	}
		
	@Override
	public boolean execute() {
		final AlphaAnimation alphaAnimation = new AlphaAnimation(1F, 0F);
		alphaAnimation.setDuration(duration);
		System.out.println("Fading");
		this.current.startAnimation(alphaAnimation);
		setStarted(true);
		return true;
	}

	

	
}
